package cn.lingyangwl.agile.pay.pay.controller.transfer;

import cn.lingyangwl.agile.pay.common.annotation.PayCheck;
import cn.lingyangwl.agile.pay.pay.model.rqrs.transfer.QueryTransferOrderRQ;
import cn.lingyangwl.framework.core.response.Resp;
import cn.lingyangwl.agile.pay.validation.PaySignGroup;
import cn.lingyangwl.agile.pay.pay.process.transfer.QueryTransferOrderProcess;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 商户转账单查询controller
 *
 * @author shenguangyang
 */
@Slf4j
@RestController
@RequestMapping("/pay/transfer")
public class QueryTransferOrderController {
    @Resource
    private QueryTransferOrderProcess queryTransferOrderProcess;


    /**
     * 查单接口
     */
    @GetMapping("/getTransfer")
    @PayCheck
    public Resp<?> queryTransferOrder(@RequestParam @Validated(value = PaySignGroup.class) QueryTransferOrderRQ rq){
        return queryTransferOrderProcess.queryTransferOrder(rq);
    }
}
